package com.yc.controller;

/**
 * @author mqm
 * @version 1.0
 * @date 2023/8/2 11:10
 */

import com.yc.service.impl.MajorInfoServiceImpl;
import com.yc.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 专业
 */
@RestController
public class MajorInfoController {

    @Resource
    private MajorInfoServiceImpl majorInfoService;

    @ApiOperation("查询专业名")
    @GetMapping("/queryMname")
    public Result queryMname(){
        List<String> list = majorInfoService.queryMname();
        return Result.success(list);
    }

    @ApiOperation("专业年份变化查询班级")
    @GetMapping("/selectClass")
    public Result selectClass(@RequestParam("mname") String mname, @RequestParam("year") String year){
        List<String> list = majorInfoService.selectClass(mname, year);
        return Result.success(list);
    }


}
